export const rules = (validateFns: any) => {
  return {
    transactionDepartment: [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'change']
      }
    ],
    transactionType: [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'change']
      }
    ],
    assetType: [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'change']
      }
    ],
    transactionDate: [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'change']
      }
    ],
    transactionNumber: [
      {
        required: true,
        validator: validateFns.validateTransactionNumber,
        trigger: ['submit', 'blur']
      }
    ],
    transactionYear: [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'change']
      }
    ],
    transactionPrice: [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'blur']
      }
    ],
    transactionCost: [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'blur']
      }
    ],
    transactionTotalAmount: [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'blur']
      }
    ]
  };
};
